﻿using Exam.Domain.Tables;
using Exam.IService;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Exam.IRepositoy;
using Exam.Shared.Dto;
using Exam.Shared;

namespace Exam.Service
{
    public class ProductCategoryService :BaseService< Tb_Proudct_CategoryOutpuDto, Tb_Proudct_Category>, IProductCategoryService
    {
        private readonly IProductCategoryRepository _productCategoryRepository;

        public ProductCategoryService(IProductCategoryRepository productCategoryRepository, AutoMapper.IMapper mapper,IBaseRepository<Tb_Proudct_Category> baseRepository):base(baseRepository, mapper)
        {
            _productCategoryRepository = productCategoryRepository;

        }

        public List<Tb_Proudct_CategoryOutpuDto> GetAll()
        {
            var res= _productCategoryRepository.GetAll();
            return _mapper.Map<List<Tb_Proudct_CategoryOutpuDto>>(res);
        }
    }
}
